Many computer systems include one or more processors which are configured to execute computer instructions. Computer systems also often include other devices such as a memory and/or peripheral devices such as a camera or keyboard, etc. Events can occur at the devices in a computer system which require a processor to respond, e.g. which require the processor to execute some instructions relating to the events. There are many different types of event to which a processor may respond, which may be generated by many different sources (e.g. devices) of the computer system. For example, in a communications processing system, an event may be generated by hardware in response to the filling of a buffer of received sampled data. In another example, an event may be generated by software when a memory buffer can be released for re-use.
When an event occurs which requires a response from the processor an indication that the event is pending (e.g. an event flag) may be sent to the processor to indicate that the processor should respond to the event. There may be times at which events are occurring at a faster rate than the rate at which the processor can handle the events. Therefore the processor can use a queuing system to queue the events to be processed. The queues are implemented in software at the processor, and as an example there may be a queue for each source of events, or alternatively one queue may be used to queue events generated by more than one source. When the processor is ready to respond to a new event, a decision can be made as to which of the queued events the processor should respond to next. This decision is implemented in software at the processor, and may for example be based upon a set of rules. For example, events from some sources may be prioritised over events from other sources. The decision may also be based on the length of time that an event has been waiting for a response from the processor.
The processor takes time and processing resources for queuing the events in the software queues and to implement the software instructions of the decision process in order to determine which event the processor is to respond to next. Reducing the time and/or processing resources that the processor spends for queuing events and to implement the decision process may provide a more efficient computer system in terms of how the processor responds to events that occur in the computer system. Any improvements to the efficiency of a computer system are often beneficial.